Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use serde to deserialize program arguments #144

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

m-kus
Copy link
Collaborator

@m-kus m-kus commented Sep 5, 2024

Currently we initialize the Cairo memory directly using the information about layouts of the types we use.

However, there are two issues with this approach:

  • It doesn't always work, there are edge cases that do not fall under the common encoding scheme
  • Type constraints are ignored, e.g. you can initialize a u8 variable with 1000 and the program will work just fine

This PR uses Serde to deserialize program arguments properly.

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
raito ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 8:12pm

Copy link
Collaborator

@maciejka maciejka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for later: do we want to keep scripts like integration_tests.sh in shell? For me it is always easier to write/maintain python.

@maciejka maciejka merged commit 123233b into main Sep 6, 2024
5 checks passed
@m-kus
Copy link
Collaborator Author

m-kus commented Sep 6, 2024

Question for later: do we want to keep scripts like integration_tests.sh in shell? For me it is always easier to write/maintain python.

Great thing about shell is that you can copy paste specific lines to the terminal and run commands that you need, so it’s sort of an instruction.

i think that as long they are used just for orchestration it is fine.

longer term i would prefer rust (we can use typed python, it’s just hard to enforce) especially if we end up having custom runner.

@m-kus m-kus deleted the feat/program-args-serde branch September 7, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants